<!doctype html>
<html>
<head>
<meta charset="utf-8">
<uu:u listname="u" uid="$_GET['uid']"/> 
<title>{:SEO('u-view','title',array('USERNEME'=>$u['user']['username']))}</title>
<meta name="keywords" content="{:SEO('u-view','keywords',array('USERNEME'=>$u['user']['username']))}">
<meta name="description" content="{:SEO('u-view','description',array('USERNEME'=>$u['user']['username']))}">
<link href="__ROOT__/{:C('UU_TPL_DIR')}/public/css/common.css" rel="stylesheet" type="text/css">
<link href="__ROOT__/{:C('UU_TPL_DIR')}/public/css/u.css" rel="stylesheet" type="text/css">
<script src="__ROOT__/{:C('UU_TPL_DIR')}/public/js/jquery.min.js"></script>
</head>

<body>
<include file="public:header" />
<include file="top" />



<div class="umain">
   <include file="left" />
  
  <div class="usc link_gray3">
  
    <div class="info">
	  <div class="tit"><h2>TA的动态</h2>
	    <div class="more"><a href="{:RU('u/lists',array('uid'=>$_GET['uid'],'type'=>'track'))}">更多></a></div>
	  </div>

<uu:track listname="track" uid="$_GET['uid']" page="0" num="3"/>

<volist name="track.list" id="li">
<div class="qtxt">
<a href="{$li.user.user_url}" target="_blank">{$li.user.username}</a>
&nbsp;{$li.type_str}&nbsp;
{$li.addtime_str}

<notempty name="li.question">

  <div class="text substring link_blue">
  <a href="{$li.question.url}" target="_blank">{$li.question.title}</a>
  <notempty name="li.question.reward"><span class="reward">{$li.question.reward}</span></notempty>
  </div>
</notempty>


<notempty name="li.answer">
  <div class="text substring" >{$li.answer.content}</div>
</notempty>


</div>

</volist>
<empty name="track.list">
<div class="infoempty"> 暂时木有内容呀～～</div>
</empty>

	</div>
	
	<div class="info">
	  <div class="tit"><h2>TA的提问</h2>
	    <div class="more"><a href="{:RU('u/lists',array('uid'=>$_GET['uid'],'type'=>'question'))}">更多></a></div>
	  </div>
	 <uu:question listname="q" uid="$_GET['uid']" page="0" num="3"/> 
	  <volist name="q.list" id="li">
	    <div class="qlist">
		 <div class="link_blue">
		 <if condition="$li.issolve eq '1' "><span class="issolve">已解决</span></if>
		<a href="{$li.url}" target="_blank">{$li.title}</a>
		<notempty name="li.reward"><span class="reward">{$li.reward}</span></notempty>
		</div>
		 <a href="{$li.uurl}" target="_blank">{$li.uname}</a><span> 发布于 {$li.addtimestr}</span>&nbsp;&nbsp;|&nbsp;&nbsp;{$li.answercount} 回答
		 <notempty name="li.tags">&nbsp;&nbsp;|<span class="tag"></notempty>
		 <volist name="li.tags" id="tagsli">
		<a href="{$tagsli.tagurl}" target="_blank">{$tagsli.tag}</a>
		  </volist> 
		  <notempty name="li.tags"></span></notempty>
		</div>
	  </volist>
	  
	  <empty name="q.list">
<div class="infoempty"> 暂时木有内容呀～～</div>
</empty>
	</div>
	
	
	<div class="info">
	  <div class="tit"><h2>TA的回答</h2>
	    <div class="more"><a href="{:RU('u/lists',array('uid'=>$_GET['uid'],'type'=>'answer'))}">更多></a></div>
	  </div>
	  <uu:answer listname="a" uid="$_GET['uid']" page="0" num="3"/> 
	  <volist name="a.list" id="li">
	    <div class="alist">
		<div class="link_blue">
		<notempty name="li.question.issolve"><span class="issolve">已解决</span></notempty>
		<notempty name="li.question.title">
		<a href="{$li.question.url}" target="_blank">{$li.question.title}</a>
		<else />
		<a href="javascript:void(0)" target="_blank" style="text-decoration:line-through">问题已经被删除</a>
		</notempty>
		<notempty name="li.question.reward"><span class="reward">{$li.question.reward}</span></notempty>
		</div>
		<div class="text substring">{$li.content}</div>
		 <a href="{$li.user.user_url}" target="_blank">{$li.user.username}</a><span> 回答于 {$li.addtime_str}</span>
		 <eq name="li.optimal" value="1"><span class="optimal">最佳答案</span></eq>
		</div>
	  </volist>
	  <empty name="a.list">
<div class="infoempty"> 暂时木有内容呀～～</div>
</empty>



	</div>
	
	<div class="info">
	  <div class="tit"><h2>TA的文章</h2>
	    <div class="more"><a href="{:RU('u/lists',array('uid'=>$_GET['uid'],'type'=>'article'))}">更多></a></div>
	  </div>
	  
	  
<uu:article listname="new"  uid="$_GET['uid']" page="0" num="5" />
<volist name="new.list" id="li">
<div class="newlist">
			<div class="ltxt1">
					  <if condition="$li.excellent eq '1' "><span class="exc">精华</span></if>
						<a href="{$li.url}">{$li.title}</a>
			</div>
			<div class="ltxt2">
			{$li.addtime_str}&nbsp;/&nbsp;人气<span class="co">{$li.click}</span>&nbsp;/&nbsp;推荐<span class="co">{$li.praise}</span>
			</div>
			<div class="clear"></div>
</div>
</volist>
<empty name="new.list">
<div class="infoempty"> 暂时木有内容呀～～</div>
</empty>
 
	</div>
	
  </div>
  
  
  
  
  
  <include file="right" />
  <div class="clear"></div>
</div>
 

<include file="public:footer" />
<script type="text/javascript">
$(document).ready(function()
{
//修改擅长
	$('.J_user_edit_sp').live('click',function() {
		 var UUDialog = $(this).dialog({
		        title: false,
        		loading: true,
				footer: false,
				header: false,
				border: false,
				backdrop: false
		});
		 $.getJSON(ajaxURL, { act: "ajax_edit_sp"}, function(json){
					if (json.status==0){
						UUDialog.hide();
						disapperTooltip("remind", json.content);
					}else if (json.status==1){
						UUDialog.hide();
						var MDialog = $(this).dialog({
								title: "修改我的擅长",
								content:json.content,
								footer: true,
								header: true,
								border: true,
								innerPadding: true,
								backdrop: true,
								yes: function() {
									
									specialty=$('#ajax_edit_sp_input').val()
										$.getJSON(ajaxURL, { act: "ajax_edit_sp",specialty:specialty}, function(json){
										if (json.status==0){
											disapperTooltip("remind", json.content);
										}else if (json.status==1){
 											disapperTooltip("success",json.content);
											$('.J_user_edit_sp').text('擅长：'+json.specialty);
										}else{
											disapperTooltip("remind","修改失败，未知错误");
										}
								});
									
 	
									
							}
						});
					}else{
						UUDialog.hide();
						disapperTooltip("remind","未知错误");
					}
		});
	});
//加关注
$('.J_follow').live('click',function() {
		btn=$(this);
		uid=btn.attr('uid');
		 $.getJSON(ajaxURL, { act: "ajax_user_follow",uid:uid}, function(json){
					if (json.status==0){
						disapperTooltip("remind", json.content);
					}else if (json.status==1){
					disapperTooltip("success", json.content);
					if (btn.val()=='已关注')	{
					btn.val('加关注');
					}else{
					btn.val('已关注');
					}
					$('#J_fans_count').text(json.count);
					}else{
						disapperTooltip("remind","未知错误");
					}
		});
});
//发私信
$('.J_pms').live('click',function() {
		btn=$(this);
		uid=btn.attr('uid');
		 $.getJSON(ajaxURL, { act: "ajax_pms_send",uid:uid}, function(json){
					if (json.status==0){
						disapperTooltip("remind", json.content);
					}else if (json.status==1){
					
					var pmsDialog = $(this).dialog({
								title: '发私信',
								content:json.content,
								footer: true,
								header: true,
								border: true,
								innerPadding:true,
								backdrop:true,
								yes: function() {
									msg=$('textarea[id=J_send_msg]').val();
									to_uid='{$u.user.uid}';
									$.getJSON(ajaxURL, { act: "ajax_pms_save",msg:msg,to_uid:to_uid},function(json){
										if (json.status==0){
											disapperTooltip("remind", json.content);
										}else if (json.status==1){
 											disapperTooltip("success",json.content);
											$('.modal').remove();
											$('.modal_backdrop').remove();
										}else{
											disapperTooltip("remind","操作失败，未知错误");
										}
								});
									
 	
									
							}
						});
						pmsDialog.setCloseDialog(false);
					}else{
						disapperTooltip("remind","未知错误");
					}
		});
});

});
</script>
</body>
</html>
